UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'psbMb/iIC8/cwR8KzgTR7IUQkisvIt8p3wtKRfUM4BQ='
WHERE
key_id = '0c1ac5617ba6ea6b7d1c27a7eafedb9ed68d3f3b81431bae776ec9b57ccd30c6'
AND (
token = 'psbMb/iIC8/cwR8KzgTR7IUQkisvIt8p3wtKRfUM4BQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)