UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vjfH2+/gEYhHiW9N+/MIBJR352tbsjxhYm1EwPS5Ua8='
WHERE
key_id = 'c7208553e3d3775b409bce456bd75b1e6f25dcd59d8a3ba5e8e7b6e4f2ff7e93'
AND (
token = 'vjfH2+/gEYhHiW9N+/MIBJR352tbsjxhYm1EwPS5Ua8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)