UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5QkcbDsFmsMhcOIQ93nqb+K9VKsBj4jUzi+W3cFPQEQ='
WHERE
key_id = '1267dfbaf23845e80ff2673bd1ff809a9c42170dcf1a7ed198ca60881376eee5'
AND (
token = '5QkcbDsFmsMhcOIQ93nqb+K9VKsBj4jUzi+W3cFPQEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)