UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hZohxwslijQ6EzSahKc4Jg52qn2LIEgnUNm1j0l/AvA='
WHERE
key_id = 'e73630ce283aac00eefd234356ecde66880316ddeaba9d65036d244f95793177'
AND (
token = 'hZohxwslijQ6EzSahKc4Jg52qn2LIEgnUNm1j0l/AvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)