UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+bup06VKwArSm/39BinuMtNYBFLdDHBeNRFWybe/wok='
WHERE
key_id = '570ee22858c112f64d1640d30eb8efb6248f579618693622a8866674f300aebc'
AND (
token = '+bup06VKwArSm/39BinuMtNYBFLdDHBeNRFWybe/wok='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)