UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fc0sL1phh7iHOqqo6YlPSUp/CaX80Qhqb3ef0B60jwU='
WHERE
key_id = '468c56d09db33482e6898e7a6e1a9806a217276a8f3ce54bad71295759ca9c2d'
AND (
token = 'Fc0sL1phh7iHOqqo6YlPSUp/CaX80Qhqb3ef0B60jwU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)