UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZXAB/rmxPqGgbc0TyYknMv9tXXdhxlJnf1S7ivjimic='
WHERE
key_id = 'f1e76b9145d1c7d45c80a2bdeba225b030eae6aed6654db7ad40b52d46ea3d63'
AND (
token = 'ZXAB/rmxPqGgbc0TyYknMv9tXXdhxlJnf1S7ivjimic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)