UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GmsQqk/3tFLgJF6CSCGCoHxBIal/JpfYd1o+0if8u4Q='
WHERE
key_id = '88386633f651797328e9b17925ba4aad1bd55e6b73c4315fc440cfeb7f15afb6'
AND (
token = 'GmsQqk/3tFLgJF6CSCGCoHxBIal/JpfYd1o+0if8u4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)