UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PpBB3gbtec1o/vJaqYCdYB69XXKL6DV5v/WHzWXje14='
WHERE
key_id = '8b70bd4e63dc0d03f44b2f61a84736dde1c1d3553c9a206416bbb01ca5dced84'
AND (
token = 'PpBB3gbtec1o/vJaqYCdYB69XXKL6DV5v/WHzWXje14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)