UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1d8CUhQFuC/InHwWznRakPsHsDiLqjJcYs93feWbSgQ='
WHERE
key_id = '6e2c5ef9c7cb0eb81a5bd7c11341b8c05a3c4a41302ac95f2756fb6d034c0c6a'
AND (
token = '1d8CUhQFuC/InHwWznRakPsHsDiLqjJcYs93feWbSgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)