UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm+umjuSm6DzXGSnmMmSCYyzNtr0017JDFs33qByf5kA='
WHERE
key_id = '303a9160dfd6a1744bbe5ac81766826b977d6abb75d2435920142bed5c58c649'
AND (
token = 'm+umjuSm6DzXGSnmMmSCYyzNtr0017JDFs33qByf5kA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)