UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VUJvmUTiIxz2PR5AZ3kBYMV7pEZ2ohlSnOlNedHmdg='
WHERE
key_id = 'ec9267f05eb098054f60ced58c8cd3c51a34328293f40dd02f36806339230590'
AND (
token = '+VUJvmUTiIxz2PR5AZ3kBYMV7pEZ2ohlSnOlNedHmdg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)