UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IsljbD+CdgBH6SEDneJ9e5LVbdD1PJCoYLxpOReD7mA='
WHERE
key_id = '7a7f251126d6be715bdb98a15211752557ef1bee811ac92030832cee861e6422'
AND (
token = 'IsljbD+CdgBH6SEDneJ9e5LVbdD1PJCoYLxpOReD7mA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)