UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JkYz07iTPE9ggtWeCzNOcYB9aZC5Hda6RG34I1c/lNU='
WHERE
key_id = '7aa4ec5f042c915bc419da28a7d4a69f04778c90630bbc847c970b84e74d3852'
AND (
token = 'JkYz07iTPE9ggtWeCzNOcYB9aZC5Hda6RG34I1c/lNU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)