UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'arjC8hr5oTcpNxfwxl2xiPqR50+Y04626DyiSeUDJN4='
WHERE
key_id = '6d72d958f5edf1d1f8fbde745c26bc1f1b1b2dea2e2b78bcaa4b6362bbb23475'
AND (
token = 'arjC8hr5oTcpNxfwxl2xiPqR50+Y04626DyiSeUDJN4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)