UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hgvto5r9sf4V3iG3gp6t9eOwrhAihIqmwgJYHP1NK0I='
WHERE
key_id = '1c0d60d2131d99d3d102401129c20630c02af57cdbfea877b639415f5f155550'
AND (
token = 'Hgvto5r9sf4V3iG3gp6t9eOwrhAihIqmwgJYHP1NK0I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)