UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WlrOvJ9ggaQm36DluoIrgbedfENNPpO9OdyS8b9ZeZA='
WHERE
key_id = '4363878fcb112228a5d57ae973c5d5d266050baca8f7d287653410cf325d00d9'
AND (
token = 'WlrOvJ9ggaQm36DluoIrgbedfENNPpO9OdyS8b9ZeZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)