UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DfRZ0koRsLX5aHX8jlaxjDks0ZnTnzetcv/QwNrwtZY='
WHERE
key_id = '1bf6fac86a34f97a80ab8dbe47d23c2607b41ef170c8cf8fec864787b45e011f'
AND (
token = 'DfRZ0koRsLX5aHX8jlaxjDks0ZnTnzetcv/QwNrwtZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)