UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rWyvgBJUY49J9boANAzgmNh702WXfASTNr8hEwN/XHw='
WHERE
key_id = '190be2aa9d7f648c4a513272a6fc3a98fdfb81ee04240e866ebf881016ba3997'
AND (
token = 'rWyvgBJUY49J9boANAzgmNh702WXfASTNr8hEwN/XHw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)