UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p1hQUNrzceIfjbTej5w0D2/J1TygIzM3lUK547TuoNg='
WHERE
key_id = '60daa278694d5afd29071eb6f2bb5b5b130e139f1139fd77972a25b420e214bf'
AND (
token = 'p1hQUNrzceIfjbTej5w0D2/J1TygIzM3lUK547TuoNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)