UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'axm5MWR8H4mtiZatdmLHLRtVhSZ6AcxbA/06p4sylQg='
WHERE
key_id = '1a4bf1c1484366954f165319dbe66aee696692d512e36e69b4a12d48725e7362'
AND (
token = 'axm5MWR8H4mtiZatdmLHLRtVhSZ6AcxbA/06p4sylQg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)