UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/IcHOQyI7Y/17G7+bxNl23enLp3OsaEdlUjmOb63n3U='
WHERE
key_id = '619abbaa8895a941ffa31c2425c8dad6b173e63516286bcaf461afacb7c80a4c'
AND (
token = '/IcHOQyI7Y/17G7+bxNl23enLp3OsaEdlUjmOb63n3U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)