UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4iNhiCFJHyQREGBrtjrB/wQNVVdMB4+TDzrdf+Lj6ZE='
WHERE
key_id = '65250452309cb7f5742e6faf504ed76af0f2369c7505dc74cd099ae5d5d2d980'
AND (
token = '4iNhiCFJHyQREGBrtjrB/wQNVVdMB4+TDzrdf+Lj6ZE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)