UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/GolU7l3u66MaSzoZnHI9SdfPoHaj0IFHJVWBHefWkI='
WHERE
key_id = '3db304c87c9e95075bc05003ae2691e35d7344a2072381971d9d5d3fedb10347'
AND (
token = '/GolU7l3u66MaSzoZnHI9SdfPoHaj0IFHJVWBHefWkI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)