UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q+hSCP7o6s/h/Omz2R9tL5Pnv5taSaRvbVR6nywl0DY='
WHERE
key_id = '910c13c00c852f33a095ab1289a0c192e45ffdb2d19e984ac9621a9d706c3d51'
AND (
token = 'Q+hSCP7o6s/h/Omz2R9tL5Pnv5taSaRvbVR6nywl0DY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)