UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cKwUBGWlv4yE+4I8LFJPDlCYunU4imkfhJqtihlnCdo='
WHERE
key_id = 'b10d04fabbb2780fdcce9fa8fa8052fa1595246bc19c6bf571f34acf4a2781fd'
AND (
token = 'cKwUBGWlv4yE+4I8LFJPDlCYunU4imkfhJqtihlnCdo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)