UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GNz+aEjRRe+0LaerO4Xh+a/bIC06kP/HuJ0xFgyIMHU='
WHERE
key_id = 'd2c061cd518f46375f0ab5f69a1daed6e9d72e2968d71e6c4e5dd5add58b0ba9'
AND (
token = 'GNz+aEjRRe+0LaerO4Xh+a/bIC06kP/HuJ0xFgyIMHU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)