UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1+oknPz/byiRPMVG1I+lx4EMvYWhG3xAEXafxXsGiuc='
WHERE
key_id = 'b8772969522381a1931d8e713bcad22412bbf0ef3e781a75c86bd43e18fa343b'
AND (
token = '1+oknPz/byiRPMVG1I+lx4EMvYWhG3xAEXafxXsGiuc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)